<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>MGSwipeTableCellDelegate Protocol Reference</title>

	<link rel="stylesheet" href="../css/style.css">
	<meta name="viewport" content="initial-scale=1, maximum-scale=1.4">
	<meta name="generator" content="appledoc 2.2.1 (build 1334)">
</head>
<body class="appledoc">
	<header>
		<div class="container" class="hide-in-xcode">
			
			<h1 id="library-title">
				<a href="../index.html">OBMessenger </a>
			</h1>

			<p id="developer-home">
				<a href="../index.html">On-Bright</a>
			</p>
			
		</div>
	</header>

	<aside>
		<div class="container">
			<nav>
				<ul id="header-buttons" role="toolbar">
					<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>

					<li id="on-this-page" role="navigation">
						<label>
							On This Page

							<div class="chevron">
								<div class="chevy chevron-left"></div>
								<div class="chevy chevron-right"></div>
							</div>

							<select id="jump-to">
	<option value="top">Jump To&#133;</option>
	
	<option value="overview">Overview</option>
	

	
	
	<option value="tasks">Tasks</option>
	
	

	
	

	

	
	<optgroup label="Instance Methods">
		
		<option value="//api/name/swipeTableCell:canSwipe:fromPoint:">- swipeTableCell:canSwipe:fromPoint:</option>
		
		<option value="//api/name/swipeTableCell:didChangeSwipeState:gestureIsActive:">- swipeTableCell:didChangeSwipeState:gestureIsActive:</option>
		
		<option value="//api/name/swipeTableCell:shouldHideSwipeOnTap:">- swipeTableCell:shouldHideSwipeOnTap:</option>
		
		<option value="//api/name/swipeTableCell:swipeButtonsForDirection:swipeSettings:expansionSettings:">- swipeTableCell:swipeButtonsForDirection:swipeSettings:expansionSettings:</option>
		
		<option value="//api/name/swipeTableCell:tappedButtonAtIndex:direction:fromExpansion:">- swipeTableCell:tappedButtonAtIndex:direction:fromExpansion:</option>
		
		<option value="//api/name/swipeTableCellWillBeginSwiping:">- swipeTableCellWillBeginSwiping:</option>
		
		<option value="//api/name/swipeTableCellWillEndSwiping:">- swipeTableCellWillEndSwiping:</option>
		
	</optgroup>
	
	
</select>
						</label>
					</li>
				</ul>
			</nav>
		</div>
	</aside>

	<article>
		<div id="overview_contents" class="container">
			<div id="content">
				<main role="main">
					<h1 class="title">MGSwipeTableCellDelegate Protocol Reference</h1>

					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<th>Conforms to</th>
	<td>NSObject</td>
</tr><tr>
	<th>Declared in</th>
	<td>MGSwipeTableCell.h</td>
</tr>
						</tbody></table></div>
					

                    
					
					<div class="section section-overview">
						<a title="Overview" name="overview"></a>
						<h2 class="subtitle subtitle-overview">Overview</h2>
						<p>Optional delegate to configure swipe buttons or to receive triggered actions.
Buttons can be configured inline when the cell is created instead of using this delegate,
but using the delegate improves memory usage because buttons are only created in demand</p>
					</div>
					
					

					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						

						
						

						<div class="task-list">
							<div class="section-method">
	<a name="//api/name/swipeTableCell:canSwipe:fromPoint:" title="swipeTableCell:canSwipe:fromPoint:"></a>
	<h3 class="method-title"><code><a href="#//api/name/swipeTableCell:canSwipe:fromPoint:">&ndash;&nbsp;swipeTableCell:canSwipe:fromPoint:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Delegate method to enable/disable swipe gestures</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (BOOL)swipeTableCell:(nonnull MGSwipeTableCell *)<em>cell</em> canSwipe:(MGSwipeDirection)<em>direction</em> fromPoint:(CGPoint)<em>point</em></code></div>

		    
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>YES if swipe is allowed</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">MGSwipeTableCell.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/swipeTableCell:didChangeSwipeState:gestureIsActive:" title="swipeTableCell:didChangeSwipeState:gestureIsActive:"></a>
	<h3 class="method-title"><code><a href="#//api/name/swipeTableCell:didChangeSwipeState:gestureIsActive:">&ndash;&nbsp;swipeTableCell:didChangeSwipeState:gestureIsActive:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<ul>
<li>Delegate method invoked when the current swipe state changes</li>
</ul>

			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)swipeTableCell:(nonnull MGSwipeTableCell *)<em>cell</em> didChangeSwipeState:(MGSwipeState)<em>state</em> gestureIsActive:(BOOL)<em>gestureIsActive</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>state</code></th>
						<td><p>the current Swipe State</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>gestureIsActive</code></th>
						<td><p>YES if the user swipe gesture is active. No if the uses has already ended the gesture
*</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">MGSwipeTableCell.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/swipeTableCell:tappedButtonAtIndex:direction:fromExpansion:" title="swipeTableCell:tappedButtonAtIndex:direction:fromExpansion:"></a>
	<h3 class="method-title"><code><a href="#//api/name/swipeTableCell:tappedButtonAtIndex:direction:fromExpansion:">&ndash;&nbsp;swipeTableCell:tappedButtonAtIndex:direction:fromExpansion:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Called when the user clicks a swipe button or when a expandable button is automatically triggered</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (BOOL)swipeTableCell:(nonnull MGSwipeTableCell *)<em>cell</em> tappedButtonAtIndex:(NSInteger)<em>index</em> direction:(MGSwipeDirection)<em>direction</em> fromExpansion:(BOOL)<em>fromExpansion</em></code></div>

		    
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>YES to autohide the current swipe buttons</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">MGSwipeTableCell.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/swipeTableCell:swipeButtonsForDirection:swipeSettings:expansionSettings:" title="swipeTableCell:swipeButtonsForDirection:swipeSettings:expansionSettings:"></a>
	<h3 class="method-title"><code><a href="#//api/name/swipeTableCell:swipeButtonsForDirection:swipeSettings:expansionSettings:">&ndash;&nbsp;swipeTableCell:swipeButtonsForDirection:swipeSettings:expansionSettings:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Delegate method to setup the swipe buttons and swipe/expansion settings
Buttons can be any kind of UIView but it&rsquo;s recommended to use the convenience <a href="../Classes/MGSwipeButton.html">MGSwipeButton</a> class
Setting up buttons with this delegate instead of using cell properties improves memory usage because buttons are only created in demand</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (nullable NSArray&lt;UIView*&gt; *)swipeTableCell:(nonnull MGSwipeTableCell *)<em>cell</em> swipeButtonsForDirection:(MGSwipeDirection)<em>direction</em> swipeSettings:(nonnull MGSwipeSettings *)<em>swipeSettings</em> expansionSettings:(nonnull MGSwipeExpansionSettings *)<em>expansionSettings</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>cell</code></th>
						<td><p>the UITableViewCell to configure. You can get the indexPath using [tableView indexPathForCell:cell]</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>direction</code></th>
						<td><p>The swipe direction (left to right or right to left)</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>swipeSettings</code></th>
						<td><p>instance to configure the swipe transition and setting (optional)</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>expansionSettings</code></th>
						<td><p>instance to configure button expansions (optional)</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>Buttons array</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">MGSwipeTableCell.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/swipeTableCell:shouldHideSwipeOnTap:" title="swipeTableCell:shouldHideSwipeOnTap:"></a>
	<h3 class="method-title"><code><a href="#//api/name/swipeTableCell:shouldHideSwipeOnTap:">&ndash;&nbsp;swipeTableCell:shouldHideSwipeOnTap:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Called when the user taps on a swiped cell</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (BOOL)swipeTableCell:(nonnull MGSwipeTableCell *)<em>cell</em> shouldHideSwipeOnTap:(CGPoint)<em>point</em></code></div>

		    
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>YES to autohide the current swipe buttons</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">MGSwipeTableCell.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/swipeTableCellWillBeginSwiping:" title="swipeTableCellWillBeginSwiping:"></a>
	<h3 class="method-title"><code><a href="#//api/name/swipeTableCellWillBeginSwiping:">&ndash;&nbsp;swipeTableCellWillBeginSwiping:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Called when the cell will begin swiping
Useful to make cell changes that only are shown after the cell is swiped open</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)swipeTableCellWillBeginSwiping:(nonnull MGSwipeTableCell *)<em>cell</em></code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">MGSwipeTableCell.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/swipeTableCellWillEndSwiping:" title="swipeTableCellWillEndSwiping:"></a>
	<h3 class="method-title"><code><a href="#//api/name/swipeTableCellWillEndSwiping:">&ndash;&nbsp;swipeTableCellWillEndSwiping:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Called when the cell will end swiping</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)swipeTableCellWillEndSwiping:(nonnull MGSwipeTableCell *)<em>cell</em></code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">MGSwipeTableCell.h</code></p>
			</div>
			
			
		</div>
	</div>
</div>
						</div>
						
					</div>
					
					

                    
                    
          
				</main>

				<footer>
					<div class="footer-copyright">
						
						<p class="copyright">Copyright &copy; 2017 On-Bright. All rights reserved. Updated: 2017-06-09</p>
						
						
						<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
						
					</div>
				</footer>
			</div>
		</div>
	</article>

	<script src="../js/script.js"></script>
</body>
</html>